package com.typhoon.spring_shiro.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.typhoon.spring_shiro.dao.RoleDao;
import com.typhoon.spring_shiro.dto.RoleDto;
import com.typhoon.spring_shiro.entity.Role;
import com.typhoon.spring_shiro.service.RoleService;
import com.typhoon.spring_shiro.utils.CollectionUtils;

@Service("roleService")
public class RoleServiceImpl implements RoleService {
	
	private static final Logger logger = LoggerFactory.getLogger(RoleServiceImpl.class);


	@Resource
	private RoleDao roleDao;
	
	@Override
	public int save(RoleDto paramE) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int saveBatch(List<? extends RoleDto> paramList) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int update(RoleDto paramE) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateBatch(List<RoleDto> paramList) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPK(Long paramK) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteBatchByPK(List<Long> paramList) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int delete(RoleDto paramE) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteBatch(RoleDto paramE) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public RoleDto get(Object paramObject) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<RoleDto> list(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<RoleDto> list(Object paramObject) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long count(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public long count(Object paramObject) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public RoleDto queryByPK(Long paramK) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<RoleDto> listAllByUserId(Long userId) {
		if(null == userId) {
			return null;
		}
		List<Role> list = roleDao.listAllByUserId(userId);
		if(null == list || list.isEmpty())
			return null;
		return CollectionUtils.transform(list, RoleDto.class);
	}

}
